﻿using MiniFox.Resources;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Sys.Core.Models.Dto
{
    /// <summary>
    /// 
    /// </summary>
    [JsonObject]
    public class RoleDto
    {
        /// <summary>
        /// 
        /// </summary>
        [Key]
        [StringLength(46, ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonStringLength")]
        [JsonProperty("roleId")]
        public string? RoleID { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "角色名", ShortName = "角色名")]
        [Required(ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonRequired")]
        [StringLength(50, ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonStringLength")]
        [Column("roleName")]
        [JsonProperty("roleName")]
        public string RoleName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "角色描述", ShortName = "角色描述")]
        [StringLength(200, ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonStringLength")]
        [Column("description")]
        [JsonProperty("description")]
        public string? Description { get; set; }

    }
}
